<template>
  <div class="tender123">
    <Hedar></Hedar>

    <div class="logoImg">
    </div>
    <Listnav></Listnav>
    <div class="clicktoubiao">

      <table border="0" width="1150"  cellspacing="0" cellpadding="0" style="margin:0 auto;">
        <thead>
        <tr>
          <th colspan="2" >
            <h3>{{item6plus.projectName}}</h3>
            <p style="width:1150px;height:30px;background: #d0e7f5;margin-bottom: 3px;"></p>
          </th>
        </tr>
        </thead>
        <tbody>
        <tr height="50">
          <td width="500">招标单位</td>
          <td>{{item6plus.owner}}</td>
        </tr>
        <tr height="50">
          <td width="500">招标代理机构</td>
          <td>{{item6plus.companyName}}</td>
        </tr>
        <tr height="50" >
          <td rowspan="2">中标单位候选公司</td>
          <td rowspan="2">
            <span class="rightspan">{{item6plus.firstCandidate}}</span>
            <span class="rightspan" v-if="item6plus.secondCandidate ? show1:!show1">{{item6plus.secondCandidate}}</span>
            <span class="rightspan" v-if="item6plus.thirdCandidate ? show1:!show1">{{item6plus.thirdCandidate}}</span>
          </td>
        </tr>
        <tr height="50"></tr>

        <tr height="50">
          <td>中标单位</td>
          <td>{{item6plus.winCompany}}</td>
        </tr>
        <tr height="50">
          <td>开标时间</td>
          <td>{{format(item6plus.winDate,'yyyy-MM-dd')}}</td>
        </tr>
        <tr height="50">
          <td>中标通告</td>
          <td> <a class="xiangqing" @click="centerDialogVisible = true" >查看详情</a></td>
        </tr>
        </tbody>
      </table>


      <!--<h3>{{item6plus.projectName}}</h3>-->
      <!--<p><span class="leftspan">招标单位</span><span class="rightspan">{{item6plus.companyName}}</span></p>-->
      <!--<p><span class="leftspan">代理公司</span><span class="rightspan">{{item6plus.companyName}}</span></p>-->
      <!--<p><span class="leftspan">中标单位候选公司</span><span class="rightspan">{{item6plus.firstCandidate}}</span></p>-->
      <!--<p v-if="item6plus.secondCandidate ? show1:!show1"><span class="leftspan">&nbsp;</span><span class="rightspan">{{item6plus.secondCandidate}}</span></p>-->
      <!--<p v-if="item6plus.thirdCandidate ? show1:!show1"><span class="leftspan">&nbsp;</span><span class="rightspan">{{item6plus.thirdCandidate}}</span></p>-->
      <!--<p><span class="leftspan">中标单位</span><span class="rightspan">{{item6plus.winCompany}}</span></p>-->
      <!--<p><span class="leftspan">开标时间</span><span class="rightspan">{{format(item6plus.winDate,'yyyy-MM-dd')}}</span></p>-->
      <!--<p><span class="leftspan">中标通告</span><span class="rightspan">-->
        <!--<a class="xiangqing" @click="centerDialogVisible = true" >查看详情</a>-->
        <!--&lt;!&ndash;<a class="xiangqing" target="_blank" :href=myfilter1(item6plus.attachment) >查看详情</a>&ndash;&gt;-->
      <!--</span>-->
      <!--</p>-->

      <div>公告日期：{{format(item6plus.publicityDate,'yyyy-MM-dd')}}</div>


      <img class="zhang_img" src="../assets/zbend.png" />
    </div>
    <Footers></Footers>
    <el-dialog
      title="通告详情"
      :visible.sync="centerDialogVisible"
      width="100%"
      :lock-scroll="true"
      center>
      <div style="width:100%;height:600px;overflow-y:scroll; ">
        <img :src=myfilter1(item6plus.attachment) style="width:1100px;height:1600px;" />
      </div>
      <span slot="footer" class="dialog-footer">
    <el-button @click="centerDialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  </span>
    </el-dialog>
  </div>
</template>

<script>

  import Footers from'@/components/Footers'
  import Listnav from "@/components/Listnav"
  import Hedar from'@/components/Hedar'
  export default {
    data () {
      return {
        item6plus:{
          projectName:"",
          companyName:"",
          firstCandidate:"",
          secondCandidate:'',
          thirdCandidate:"",
          winCompany:"",
          winDate:"",
          publicityDate:"",
          attachment:""
        },
        show1:true,
        centerDialogVisible: false


      }
    },
    methods: {
      clickpng(a){
        layer.open({
          type: 2,
          title: false,
          area: ['1200px', '360px'],
          shade: 0.8,
          closeBtn: 0,
          shadeClose: true,
          content: a
        });
      },
      myfilter1(value){
        return 'http://wut-publicity.oss-cn-beijing.aliyuncs.com/'+ value.split(';')[0]

      },
      biddinginformations(){
        let that=this
        $.ajax({
          type: "get",
          url: local+"/awm/publicity/findone?id="+that.$route.query.id,
//        url:'http://192.168.3.136:9095/awm/publicity/findone?id='+that.$route.query.id,
          dataType: "json",
          beforeSend:function (xhr) {
            xhr. withCredentials=true
          },
          success: function(data){
            console.log(data.resultData)
            that.item6plus=data.resultData
            //if(data.resultData || data.resultData.list){
           // that.item6plus=data.resultData
           // }


          },
          error:function(aa){
            console.log(aa)
          }
        })
      },
      format(time, format) {
        var t = new Date(time);
        var tf = function(i){return (i < 10 ? '0' : '') + i};
        return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function(a){
          switch(a){
            case 'yyyy':
              return tf(t.getFullYear());
              break;
            case 'MM':
              return tf(t.getMonth() + 1);
              break;
            case 'mm':
              return tf(t.getMinutes());
              break;
            case 'dd':
              return tf(t.getDate());
              break;
            case 'HH':
              return tf(t.getHours());
              break;
            case 'ss':
              return tf(t.getSeconds());
              break;
          }
        })
      },


    },
    mounted () {
      this.biddinginformations()
    },
    components: {
      Listnav,
      Hedar,
      Footers
    }
  }
</script>
<style scoped>
  /*.tender123{*/
    /**/
  /*}*/
  .clicktoubiao h3{
    width:1150px;
    min-height:65px;
    line-height:65px;
    font-size:34px;
    border-bottom:2px solid #fc9f5b;
    margin:29px auto 29px;
    color:#000;
  }
  .clicktoubiao table tr td:nth-child(1){
    background:#eaf7fd;
    border-bottom:4px solid #fff;
  }
  .clicktoubiao table tr td{
    font-size:17px;
    text-align: left;
    text-indent: 10px;
  }
  .clicktoubiao table tr td span{
    display: block;
    margin-bottom: 3px;
  }
.clicktoubiao p{
    width:1150px;
    height:49px;
    line-height:49px;
    font-size:17px;
  }
  .clicktoubiao p .leftspan{
    width:300px;
    height:49px;
    line-height:49px;
    font-size:17px;
    display:inline-block;
    text-align:right;
  }
  .clicktoubiao p .rightspan{
    width:500px;
    height:49px;
    line-height:49px;
    font-size:17px;
    display:inline-block;
  }
  .clicktoubiao div{
    width:1100px;
    height:37px;
    line-height:37px;
    font-size:17px;
    color:#cc3f46;
    text-align:right;
    padding-top:77px;
  }
  p{margin:0;padding:0;}
  .tender1{
    width:100%;
    height:1452px;
    /*background: url("../assets/dsbbbbb1.png");*/
  }
  .bbqc .el-dialog {
    width:800px;
    height:400px;
  }
  .logoImg{
    width:100%;
    height:120px;
    background:url(../assets/logobig1.png) no-repeat 0 0;
    overflow: hidden;
  }
  .logoImg .lOgin_search{
    width:490px;
    height:38px;
    margin:40px 0 0 282px;
  }
  .logoImg .lOgin_search input{
    width:408px;
    height:36px;
    background: #eaeaea;
    float:left;
    border:1px solid #ff8328;
  }
  .logoImg .lOgin_search span{
    width:80px;
    height:38px;
    line-height: 38px;
    background:#ff8328;
    float:left;
    color:#eff4fa;
  }
  .logoImg .lOgin_search span:hover{
    cursor: pointer;
  }
  .banner{
    width:100%;
    height:420px;
    background:palevioletred;
  }
  .clicktoubiao{
    width:1230px;
    min-height:680px;
    margin:14px auto 35px;
    overflow: hidden;
    position: relative;
    background: #fff;
  }
  .zhang_img{
    position:absolute;
    left:1000px;
    top:10px;
     opacity: 0.5;
     -moz-opacity: 0.5;

  }
  .xiangqing{
    color:red;
  }

  .xiangqing:hover{
    color:#ff8328;
    cursor: pointer;
  }

</style>
